<template>
    <a-form-item label="必填">
        <a-switch v-model:checked="props.curWidget.value!.options.required" :checkedValue='true' :unCheckedValue="false"/>
    </a-form-item>
</template>

<script setup lang="ts" name="required-editor">
import type { BaseWidgetType, DesignerType } from '@/xyFDesigner/type';
import type { Ref } from 'vue';

defineOptions({
    name:"required-editor"
})

const props = withDefaults(defineProps<{
    designer:DesignerType,
    curWidget:Ref<BaseWidgetType | null>
}>(),{})

</script>